import Vue from 'vue'
import {
  Form,
  FormItem,
  Button,
  Select,
  Radio,
  RadioGroup,
  RadioButton,
  Switch,
  Slider,
  InputNumber,
  Checkbox,
  Cascader,
  CheckboxGroup,
  Tree,
  Transfer,
  DatePicker,
  TimeSelect,
  TimePicker,
  Input,
  Pagination,
  Dialog,
  Icon,
  Autocomplete,
  Loading,
  MessageBox,
  Notification,
  Message,
  Container,
  Tabs,
  Main,
  Aside,
  TabPane,
  Table,
  TableColumn,
  Scrollbar,
  Row,
  Col,
  Avatar,
  Dropdown,
  DropdownMenu,
  DropdownItem,
  Card,
  Option,
  Upload,
  Carousel,
  CarouselItem,
  Link,
  Popconfirm,
  Image,
  Divider,
  Tag,
  Alert,
  Popover,
  InfiniteScroll,
  Tooltip
} from 'element-ui'
import Modal from '@/components/Modal'
// 全局修改默认配置，点击空白处不能关闭弹窗
Dialog.props.closeOnClickModal.default = false

Vue.prototype.$ELEMENT = { size: 'small', zIndex: 3000 }

Vue.use(Modal)
Vue.use(Alert)
Vue.use(Link)
Vue.use(Avatar)
Vue.use(Button)
Vue.use(Select)
Vue.use(Option)
Vue.use(Pagination)
Vue.use(Dialog)
Vue.use(Icon)
Vue.use(Loading.directive)
Vue.use(Container)
Vue.use(Main)
Vue.use(Aside)
Vue.use(Form)
Vue.use(FormItem)
Vue.use(Cascader)
Vue.use(Radio)
Vue.use(RadioGroup)
Vue.use(RadioButton)
Vue.use(Switch)
Vue.use(InputNumber)
Vue.use(Checkbox)
Vue.use(CheckboxGroup)
Vue.use(Transfer)
Vue.use(Slider)
Vue.use(Input)
Vue.use(Autocomplete)
Vue.use(DatePicker)
Vue.use(TimeSelect)
Vue.use(TimePicker)
Vue.use(Upload)
Vue.use(Tabs)
Vue.use(TabPane)
Vue.use(Table)
Vue.use(TableColumn)
Vue.use(Scrollbar)
Vue.use(Row)
Vue.use(Col)
Vue.use(Dropdown)
Vue.use(DropdownMenu)
Vue.use(DropdownItem)
Vue.use(Card)
Vue.use(Carousel)
Vue.use(CarouselItem)
Vue.use(Popconfirm)
Vue.use(Image)
Vue.use(Divider)
Vue.use(Tag)
Vue.use(Tree)
Vue.use(Popover)
Vue.use(InfiniteScroll)
Vue.use(Tooltip)

Vue.prototype.$loading = Loading.service

Vue.prototype.$msgbox = MessageBox
Vue.prototype.$alert = MessageBox.alert
Vue.prototype.$confirm = MessageBox.confirm
Vue.prototype.$prompt = MessageBox.prompt
Vue.prototype.$notify = Notification
Vue.prototype.$message = Message
Vue.prototype.$succuss = Message.success
Vue.prototype.$error = Message.error
Vue.prototype.$warning = Message.warning
